package com.kfm.jdbc.day01;

import java.sql.SQLException;

public class UtilTest {

    public static void main(String[] args) {
        String url = "jdbc:mysql://localhost:3306/scott";
        String user = "root";
        String pass = "root";
        DBUtil<Emp> util = new DBUtil<>(url, user, pass);

        String sql = "insert into temp (name) values(?)";

        try {
            int key = util.insert(sql, "文博1");
            System.out.println(key);

            util.close();
        } catch (SQLException e) {
            throw new RuntimeException(e);
        }
    }
}
